package com.xiyoufang.club.repository;

import com.xiyoufang.club.pojo.Account;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public abstract interface AccountRepository
  extends JpaRepository<Account, Integer>
{
  public abstract Account findByType(int paramInt);
  
  @Query(nativeQuery=true, value="SELECT * FROM ag_account WHERE user_id=:userId ")
  public abstract Account getAccountByUserId(@Param("userId") String paramInt);
}
